KindEditor.ready(function(K) {
 	var options = {
 		filterMode : false,
 		items:['source', '|','plainpaste','wordpaste','fontname','fontsize','forecolor','hilitecolor','bold','image','media'],
 		width:'100%',
 		height:300,
 		allowUpload : true,
 		uploadJson:"{:U('upload')}",
 		allowFileManager : true,
 		afterUpload : function(url) {
                $('#attach').val(url);
      	},
      	savePath:'/',
      	urlType:'domain',
 	}
 	
    window.editor = K.create('#message',options);
    
});